﻿@{
	Layout = "~/Views/Shared/_Layout.cshtml";
}

@model IEnumerable<dPet.Application.DataObjects.ProductCategoryDto>

<div class="page-header">
	<h3>商品大类管理</h3>
</div>

<div class="panel panel-default">
	<div class="panel-heading">
		<a href="@Url.Action("Category", "Product")" class="btn btn-info btn-sm" target="_self" title="添加大类"><span class="glyphicon glyphicon-plus-sign"></span> 添加大类</a>
	</div>
	<table class="table table-striped text-center">
		<thead>
			<tr>
				<th class="text-center">大类名称</th>
				<th class="text-center">操作</th>
			</tr>
		</thead>
		<tbody>
			@foreach (var category in Model)
			{
				<tr>
					<td>@category.Name</td>
					<td>
						<a href="@Url.Action("Category", "Product", new { id = category.Id })">编辑</a>
						&nbsp;&nbsp;
						<a href="@Url.Action("SubCategoryList", "Product", new { categoryId = category.Id })">小类列表</a>
					</td>
				</tr>
			}
		</tbody>
	</table>
</div>

@section scripts {
	<script type="text/javascript">
		$(document).ready(function () {
			set_left_nav('#ln_ProductCategoryList');
		});
	</script>
}